#ifndef LINE_H
#define LINE_H

#include <Polygon>

class Line : public Poly
{
    Q_OBJECT
public:
    explicit Line(QObject *parent = 0);
    
    virtual void draw() const;
    virtual QPointer<Poly> toPoly() const;

    void setStart(const QPointF& start);
    void setEnd(const QPointF& end);

    QPointF start() const;
    QPointF end() const;

    float length() const;
    QPointF unitVector() const;
private:
    void updateTransform();
    ControlPointHelper m_start;
    ControlPointHelper m_end;
signals:

public slots:
    
};

#endif // LINE_H
